// Customized class which simplifies control of the 

#ifndef PROTOBOT_H
#define PROTOBOT_H

#include "Arduino.h"
#include "Servo.h"

class Protobot
{
	public:
	
	Protobot();	// dummy constructor
	
	void begin();	// function to set up the motors and servo
	
	void leftMotor(int speed);	// set the left motor speed/direction -255 to 255
	void rightMotor(int speed);	// set the right motor speed/direction -255 to 255
	
	void turnLeft(int speed);	// spin left at speed 0 to 255
	void turnRight(int speed);	// spin right at speed 0 to 255
	void forward(int speed);	// move forward at speed 0 to 255
	void reverse(int speed);	// move backward at speed 0 to 255
	void stop();	// halt both motors
	
	void turnServo(int angle);	// set direction of the servo from 20 to 160
	
	byte readSensor();	// read the IR sensor and return distance in cm
	
	
	private:
	
	Servo turret;
};

#endif